

set(CMAKE_INCLUDE_CURRENT_DIR ON)

message( ${CMAKE_CURRENT_SOURCE_DIR} )

add_definitions("-D WXUSINGDLL")
add_definitions("-D __WXGTK__")
add_definitions("-D _DEBUG_" )

#add_library()
#target_sources()
add_definitions("-Wall -g")
aux_source_directory( src SOURCE_FILES )
aux_source_directory( my MY_SOURCE_FILES )

set(LIB_TYPE SHARED)
set(LIB_TYPE STATIC)

set(HEADER_FILES "")

#add_library(<name> [STATIC | SHARED | MODULE]
#            [EXCLUDE_FROM_ALL]
#            source1 [source2 ...])

add_library(rapidsvn ${LIB_TYPE} ${SOURCE_FILES} ${MY_SOURCE_FILES} ${HEADER_FILES})

#aux_source_directory(src)

#cmake 常用变量和常用环境变量查表手册---整理 .
#https://www.cnblogs.com/xianghang123/p/3556425.html
#https://blog.csdn.net/zhanghm1995/article/details/80902807?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase#CMake_123
target_include_directories(rapidsvn PUBLIC
        "/usr/include/wx-3.0/"
        "/usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0/"
        "/usr/include/apr-1.0/"
        "/usr/include/subversion-1/"
        #!!!!!!!!!!
        "/media/gogoqiu/Data/tmp/libgit2-1.1.1/include/"
        "${CMAKE_CURRENT_SOURCE_DIR}/../libsvncpp/include/"
        "${CMAKE_CURRENT_SOURCE_DIR}/../libpreference/"
        )

#
target_link_libraries( rapidsvn "pthread" "sqlite3" "svncpp"
        "wx_baseu_xml-3.0"
        "wx_gtk3u_core-3.0"
        "wx_gtk3u_adv-3.0"
        "wx_baseu_net-3.0" "wx_baseu-3.0" )

#target_link_libraries(libssh2 ${LIBRARIES})

include_directories(include)
include_directories("../libsvncpp/include")
include_directories("../libpreference")
#file(GLOB SRC_H
#	"${libgit2_SOURCE_DIR}/include/git2.h"
#	"${libgit2_SOURCE_DIR}/include/git2/*.h"
#	"${libgit2_SOURCE_DIR}/include/git2/sys/*.h")

## Compile and link libgit2
#ADD_LIBRARY(git2 ${WIN_RC} ${LIBGIT2_OBJECTS})
#TARGET_LINK_LIBRARIES(git2 ${LIBGIT2_LIBS})